package com.lucifer.d.security.util.encode;

import org.springframework.util.DigestUtils;

import java.util.Base64;

/**
 * 密码加密过滤
 *
 * @author Lucifer
 */
public class PasswordEncode {

    public static String encode(String password){
        String md5 = DigestUtils.md5DigestAsHex(password.getBytes());
        return new String(Base64.getEncoder().encode(md5.getBytes()));
    }

}
